// 全局设置

package basic

import (
	"api/common/web"
	"api/models"
	"net/http"
)

// @TagName 全局设置
// @Controller GlobalSetController
type GlobalSetController struct{}

// @Title 全局设置列表数据
// @Route /globalSet/list --> List
// @Method post
func (this *GlobalSetController) List(w http.ResponseWriter, r *http.Request) {
	defer web.PanicHandler(w, r)
	web.JsonCallBak(w, r, &models.GlobalSet{})
}

// @Title 新增全局设置信息
// @Route /globalSet/create --> Create
// @Method post
func (this *GlobalSetController) Create(w http.ResponseWriter, r *http.Request) {
	defer web.PanicHandler(w, r)
	web.CreateRecord(w, r, &models.GlobalSet{})
}

// @Title 编辑全局设置信息
// @Route /globalSet/edit --> Edit
// @Method post
func (this *GlobalSetController) Edit(w http.ResponseWriter, r *http.Request) {
	defer web.PanicHandler(w, r)
	web.EditRecord(w, r, &models.GlobalSet{})
}

// @Title 删除全局设置信息
// @Route /globalSet/delete --> Delete
// @Method post
func (this *GlobalSetController) Delete(w http.ResponseWriter, r *http.Request) {
	defer web.PanicHandler(w, r)
	web.DeleteCallBak(w, r, &models.GlobalSet{})
}
